package com.itheima.edu.day24CountDownLatch;

import java.util.concurrent.CountDownLatch;

public class Kid1 extends Thread{

    private CountDownLatch cdl;
    public Kid1(CountDownLatch cdl) {
        this.cdl = cdl;
    }

    @Override
    public void run() {
        for (int i = 1; i <= 10; i++) {
            System.out.println(getName()+"正在吃第"+i+"个饺子");
        }
        cdl.countDown();
    }
}
